﻿Namespace Downloads
    Public Class Item
        Public Id As Integer
        Public Name As String
        Public UniqueId As String
        Public ItemType As ItemType
        Public Priority As Priority
        Public Comment As String
    End Class
    Public Class File
        Public Id As Integer
        Public ItemId As Integer
        Public SHA512Hash As String
        Public Size As Long
        Public Name As String
        Public Directory As String
        Public Status As Status
        Public PartCount As Integer
        'Public PartSize As Integer
        Public Priority As Priority
        Public Started As DateTime
        Public Completed As DateTime
        Public PartsCompleted As Integer
        Public PartStatuses() As Entities.Downloads.PartStatus
        Public LastChanged As DateTime
    End Class
    Public Class FileSubscription
        Public Id As Integer
        Public SHA512Hash As String
        Public Size As Long
        Public BuddyId As Integer
    End Class
    Public Enum PartStatus As Byte
        Missing = 0
        Complete = 1
        Downloading = 2
    End Enum

    Public Enum Status As Byte
        Complete = 1
        Waiting = 2
        Downloading = 3
        Paused = 4
        Recycled = 5
        Deleted = 6
        PendingComplete = 7

        RehashCompleteFile = 8
        RehashRecycledFile = 9
    End Enum
    'Public Class Part
    '    Public Id As Long
    '    Public FileId As Integer
    '    Public PartId As Integer
    'End Class
End Namespace
